presentView 不是全屏
1
nav.modalPresentationStyle = UIModalPresentationFullScreen;
search bar 左侧icon位置偏移
在uiimageview 外面套一层uiview 设置uiview的职位1
2
3
4
5
6
7UIView * iconOutView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 40, 30)];
UIImageView* iconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"搜索图标"]];
iconView.center = CGPointMake(iconOutView.frame.size.width/2,iconOutView.frame.size.height/2);
[iconOutView addSubview:iconView];
self.leftView = iconOutView;
self.leftViewMode = UITextFieldViewModeAlways;launch img要被禁用了 需要配置成launch screen
先创建一个launch screen文件
点击xcode 右上角的加号 添加imageview
添加约束显示dark mode status bar not show
Status bar style Default
User Interface Style Light
View controller-based status bar appearance YES